#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <poll.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/select.h>
#include <pthread.h>
#include <time.h>

/* Definições Globais do servidor de Chat */
#define SERVER_NAME "GUSPd"
#define SERVER_VERSION "0.1"
#define SERVER_PORT 6776

#define TOT_USERS 512

#define SZ_COMMAND 10
#define SZ_STRINGMAX 1024

typedef struct COMMANDS
{
	int id;

	char cmd[SZ_COMMAND];

	enum type { 
		NO_ARGUMENTS=0, 
		PERSON=2, 
		OBJECT=4 
	} type;

	void (*func)(int,char**);
} COMMANDS;

/* Função que interpreta todo o fluxo de mensagens que passam pelo servidor */
int server_interpret(int, char*);
